- schedule_dbDataSet.Designer.vb
- project /
1 '------------------------------------------------------------------------------
2 ' <auto-generated>
3 ' This code was generated by a tool.
4 ' Runtime Version:4.0.30319.1
5 '
6 ' Changes to this file may cause incorrect behavior and will be lost if
7 ' the code is regenerated.
8 ' </auto-generated>
9 '------------------------------------------------------------------------------
10
11 Option Strict Off
12 Option Explicit On
13
14
15
16 '''<summary>
17 '''Represents a strongly typed in-memory cache of data.
18 '''</summary>
19 <Global.System.Serializable(), _
20 Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
21 Global.System.ComponentModel.ToolboxItem(true), _
22 Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema"), _
23 Global.System.Xml.Serialization.XmlRootAttribute("schedule_dbDataSet"), _
24 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")> _
25 Partial Public Class schedule_dbDataSet
26 Inherits Global.System.Data.DataSet
27
28 Private tabletblEvent As tblEventDataTable
29
30 Private _schemaSerializationMode As Global.System.Data.SchemaSerializationMode = Global.System.Data.SchemaSerializationMode.IncludeSchema
31
32 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
33 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
34 Public Sub New()
35 MyBase.New
36 Me.BeginInit
37 Me.InitClass
38 Dim schemaChangedHandler As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
39 AddHandler MyBase.Tables.CollectionChanged, schemaChangedHandler
40 AddHandler MyBase.Relations.CollectionChanged, schemaChangedHandler
41 Me.EndInit
42 End Sub
43
44 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
45 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
46 Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
47 MyBase.New(info, context, false)
48 If (Me.IsBinarySerialized(info, context) = true) Then
49 Me.InitVars(false)
50 Dim schemaChangedHandler1 As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
51 AddHandler Me.Tables.CollectionChanged, schemaChangedHandler1
52 AddHandler Me.Relations.CollectionChanged, schemaChangedHandler1
53 Return
54 End If
55 Dim strSchema As String = CType(info.GetValue("XmlSchema", GetType(String)),String)
56 If (Me.DetermineSchemaSerializationMode(info, context) = Global.System.Data.SchemaSerializationMode.IncludeSchema) Then
57 Dim ds As Global.System.Data.DataSet = New Global.System.Data.DataSet()
58 ds.ReadXmlSchema(New Global.System.Xml.XmlTextReader(New Global.System.IO.StringReader(strSchema)))
59 If (Not (ds.Tables("tblEvent")) Is Nothing) Then
60 MyBase.Tables.Add(New tblEventDataTable(ds.Tables("tblEvent")))
61 End If
62 Me.DataSetName = ds.DataSetName
63 Me.Prefix = ds.Prefix
64 Me.Namespace = ds.Namespace
65 Me.Locale = ds.Locale
66 Me.CaseSensitive = ds.CaseSensitive
67 Me.EnforceConstraints = ds.EnforceConstraints
68 Me.Merge(ds, false, Global.System.Data.MissingSchemaAction.Add)
69 Me.InitVars
70 Else
71 Me.ReadXmlSchema(New Global.System.Xml.XmlTextReader(New Global.System.IO.StringReader(strSchema)))
72 End If
73 Me.GetSerializationData(info, context)
74 Dim schemaChangedHandler As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
75 AddHandler MyBase.Tables.CollectionChanged, schemaChangedHandler
76 AddHandler Me.Relations.CollectionChanged, schemaChangedHandler
77 End Sub
78
79 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
80 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
81 Global.System.ComponentModel.Browsable(false), _
82 Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
83 Public ReadOnly Property tblEvent() As tblEventDataTable
84 Get
85 Return Me.tabletblEvent
86 End Get
87 End Property
88
89 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
90 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
91 Global.System.ComponentModel.BrowsableAttribute(true), _
92 Global.System.ComponentModel.DesignerSerializationVisibilityAttribute(Global.System.ComponentModel.DesignerSerializationVisibility.Visible)> _
93 Public Overrides Property SchemaSerializationMode() As Global.System.Data.SchemaSerializationMode
94 Get
95 Return Me._schemaSerializationMode
96 End Get
97 Set
98 Me._schemaSerializationMode = value
99 End Set
100 End Property
101
102 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
103 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
104 Global.System.ComponentModel.DesignerSerializationVisibilityAttribute(Global.System.ComponentModel.DesignerSerializationVisibility.Hidden)> _
105 Public Shadows ReadOnly Property Tables() As Global.System.Data.DataTableCollection
106 Get
107 Return MyBase.Tables
108 End Get
109 End Property
110
111 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
112 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
113 Global.System.ComponentModel.DesignerSerializationVisibilityAttribute(Global.System.ComponentModel.DesignerSerializationVisibility.Hidden)> _
114 Public Shadows ReadOnly Property Relations() As Global.System.Data.DataRelationCollection
115 Get
116 Return MyBase.Relations
117 End Get
118 End Property
119
120 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
121 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
122 Protected Overrides Sub InitializeDerivedDataSet()
123 Me.BeginInit
124 Me.InitClass
125 Me.EndInit
126 End Sub
127
128 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
129 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
130 Public Overrides Function Clone() As Global.System.Data.DataSet
131 Dim cln As schedule_dbDataSet = CType(MyBase.Clone,schedule_dbDataSet)
132 cln.InitVars
133 cln.SchemaSerializationMode = Me.SchemaSerializationMode
134 Return cln
135 End Function
136
137 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
138 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
139 Protected Overrides Function ShouldSerializeTables() As Boolean
140 Return false
141 End Function
142
143 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
144 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
145 Protected Overrides Function ShouldSerializeRelations() As Boolean
146 Return false
147 End Function
148
149 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
150 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
151 Protected Overrides Sub ReadXmlSerializable(ByVal reader As Global.System.Xml.XmlReader)
152 If (Me.DetermineSchemaSerializationMode(reader) = Global.System.Data.SchemaSerializationMode.IncludeSchema) Then
153 Me.Reset
154 Dim ds As Global.System.Data.DataSet = New Global.System.Data.DataSet()
155 ds.ReadXml(reader)
156 If (Not (ds.Tables("tblEvent")) Is Nothing) Then
157 MyBase.Tables.Add(New tblEventDataTable(ds.Tables("tblEvent")))
158 End If
159 Me.DataSetName = ds.DataSetName
160 Me.Prefix = ds.Prefix
161 Me.Namespace = ds.Namespace
162 Me.Locale = ds.Locale
163 Me.CaseSensitive = ds.CaseSensitive
164 Me.EnforceConstraints = ds.EnforceConstraints
165 Me.Merge(ds, false, Global.System.Data.MissingSchemaAction.Add)
166 Me.InitVars
167 Else
168 Me.ReadXml(reader)
169 Me.InitVars
170 End If
171 End Sub
172
173 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
174 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
175 Protected Overrides Function GetSchemaSerializable() As Global.System.Xml.Schema.XmlSchema
176 Dim stream As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
177 Me.WriteXmlSchema(New Global.System.Xml.XmlTextWriter(stream, Nothing))
178 stream.Position = 0
179 Return Global.System.Xml.Schema.XmlSchema.Read(New Global.System.Xml.XmlTextReader(stream), Nothing)
180 End Function
181
182 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
183 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
184 Friend Overloads Sub InitVars()
185 Me.InitVars(true)
186 End Sub
187
188 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
189 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
190 Friend Overloads Sub InitVars(ByVal initTable As Boolean)
191 Me.tabletblEvent = CType(MyBase.Tables("tblEvent"),tblEventDataTable)
192 If (initTable = true) Then
193 If (Not (Me.tabletblEvent) Is Nothing) Then
194 Me.tabletblEvent.InitVars
195 End If
196 End If
197 End Sub
198
199 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
200 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
201 Private Sub InitClass()
202 Me.DataSetName = "schedule_dbDataSet"
203 Me.Prefix = ""
204 Me.Namespace = "http://tempuri.org/schedule_dbDataSet.xsd"
205 Me.EnforceConstraints = true
206 Me.SchemaSerializationMode = Global.System.Data.SchemaSerializationMode.IncludeSchema
207 Me.tabletblEvent = New tblEventDataTable()
208 MyBase.Tables.Add(Me.tabletblEvent)
209 End Sub
210
211 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
212 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
213 Private Function ShouldSerializetblEvent() As Boolean
214 Return false
215 End Function
216
217 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
218 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
219 Private Sub SchemaChanged(ByVal sender As Object, ByVal e As Global.System.ComponentModel.CollectionChangeEventArgs)
220 If (e.Action = Global.System.ComponentModel.CollectionChangeAction.Remove) Then
221 Me.InitVars
222 End If
223 End Sub
224
225 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
226 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
227 Public Shared Function GetTypedDataSetSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
228 Dim ds As schedule_dbDataSet = New schedule_dbDataSet()
229 Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType()
230 Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence()
231 Dim any As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
232 any.Namespace = ds.Namespace
233 sequence.Items.Add(any)
234 type.Particle = sequence
235 Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
236 If xs.Contains(dsSchema.TargetNamespace) Then
237 Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
238 Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
239 Try
240 Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
241 dsSchema.Write(s1)
242 Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
243 Do While schemas.MoveNext
244 schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
245 s2.SetLength(0)
246 schema.Write(s2)
247 If (s1.Length = s2.Length) Then
248 s1.Position = 0
249 s2.Position = 0
250
251 Do While ((s1.Position <> s1.Length) _
252 AndAlso (s1.ReadByte = s2.ReadByte))
253
254
255 Loop
256 If (s1.Position = s1.Length) Then
257 Return type
258 End If
259 End If
260
261 Loop
262 Finally
263 If (Not (s1) Is Nothing) Then
264 s1.Close
265 End If
266 If (Not (s2) Is Nothing) Then
267 s2.Close
268 End If
269 End Try
270 End If
271 xs.Add(dsSchema)
272 Return type
273 End Function
274
275 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
276 Public Delegate Sub tblEventRowChangeEventHandler(ByVal sender As Object, ByVal e As tblEventRowChangeEvent)
277
278 '''<summary>
279 '''Represents the strongly named DataTable class.
280 '''</summary>
281 <Global.System.Serializable(), _
282 Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
283 Partial Public Class tblEventDataTable
284 Inherits Global.System.Data.TypedTableBase(Of tblEventRow)
285
286 Private columnID As Global.System.Data.DataColumn
287
288 Private columnSubject As Global.System.Data.DataColumn
289
290 Private columnNote As Global.System.Data.DataColumn
291
292 Private columnDate As Global.System.Data.DataColumn
293
294 Private columnTime As Global.System.Data.DataColumn
295
296 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
297 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
298 Public Sub New()
299 MyBase.New
300 Me.TableName = "tblEvent"
301 Me.BeginInit
302 Me.InitClass
303 Me.EndInit
304 End Sub
305
306 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
307 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
308 Friend Sub New(ByVal table As Global.System.Data.DataTable)
309 MyBase.New
310 Me.TableName = table.TableName
311 If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
312 Me.CaseSensitive = table.CaseSensitive
313 End If
314 If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
315 Me.Locale = table.Locale
316 End If
317 If (table.Namespace <> table.DataSet.Namespace) Then
318 Me.Namespace = table.Namespace
319 End If
320 Me.Prefix = table.Prefix
321 Me.MinimumCapacity = table.MinimumCapacity
322 End Sub
323
324 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
325 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
326 Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
327 MyBase.New(info, context)
328 Me.InitVars
329 End Sub
330
331 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
332 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
333 Public ReadOnly Property IDColumn() As Global.System.Data.DataColumn
334 Get
335 Return Me.columnID
336 End Get
337 End Property
338
339 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
340 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
341 Public ReadOnly Property SubjectColumn() As Global.System.Data.DataColumn
342 Get
343 Return Me.columnSubject
344 End Get
345 End Property
346
347 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
348 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
349 Public ReadOnly Property NoteColumn() As Global.System.Data.DataColumn
350 Get
351 Return Me.columnNote
352 End Get
353 End Property
354
355 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
356 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
357 Public ReadOnly Property DateColumn() As Global.System.Data.DataColumn
358 Get
359 Return Me.columnDate
360 End Get
361 End Property
362
363 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
364 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
365 Public ReadOnly Property TimeColumn() As Global.System.Data.DataColumn
366 Get
367 Return Me.columnTime
368 End Get
369 End Property
370
371 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
372 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
373 Global.System.ComponentModel.Browsable(false)> _
374 Public ReadOnly Property Count() As Integer
375 Get
376 Return Me.Rows.Count
377 End Get
378 End Property
379
380 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
381 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
382 Public Default ReadOnly Property Item(ByVal index As Integer) As tblEventRow
383 Get
384 Return CType(Me.Rows(index),tblEventRow)
385 End Get
386 End Property
387
388 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
389 Public Event tblEventRowChanging As tblEventRowChangeEventHandler
390
391 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
392 Public Event tblEventRowChanged As tblEventRowChangeEventHandler
393
394 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
395 Public Event tblEventRowDeleting As tblEventRowChangeEventHandler
396
397 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
398 Public Event tblEventRowDeleted As tblEventRowChangeEventHandler
399
400 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
401 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
402 Public Overloads Sub AddtblEventRow(ByVal row As tblEventRow)
403 Me.Rows.Add(row)
404 End Sub
405
406 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
407 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
408 Public Overloads Function AddtblEventRow(ByVal ID As String, ByVal Subject As String, ByVal Note As String, ByVal _Date As String, ByVal Time As String) As tblEventRow
409 Dim rowtblEventRow As tblEventRow = CType(Me.NewRow,tblEventRow)
410 Dim columnValuesArray() As Object = New Object() {ID, Subject, Note, _Date, Time}
411 rowtblEventRow.ItemArray = columnValuesArray
412 Me.Rows.Add(rowtblEventRow)
413 Return rowtblEventRow
414 End Function
415
416 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
417 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
418 Public Function FindBySubject(ByVal Subject As String) As tblEventRow
419 Return CType(Me.Rows.Find(New Object() {Subject}),tblEventRow)
420 End Function
421
422 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
423 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
424 Public Overrides Function Clone() As Global.System.Data.DataTable
425 Dim cln As tblEventDataTable = CType(MyBase.Clone,tblEventDataTable)
426 cln.InitVars
427 Return cln
428 End Function
429
430 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
431 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
432 Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
433 Return New tblEventDataTable()
434 End Function
435
436 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
437 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
438 Friend Sub InitVars()
439 Me.columnID = MyBase.Columns("ID")
440 Me.columnSubject = MyBase.Columns("Subject")
441 Me.columnNote = MyBase.Columns("Note")
442 Me.columnDate = MyBase.Columns("Date")
443 Me.columnTime = MyBase.Columns("Time")
444 End Sub
445
446 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
447 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
448 Private Sub InitClass()
449 Me.columnID = New Global.System.Data.DataColumn("ID", GetType(String), Nothing, Global.System.Data.MappingType.Element)
450 MyBase.Columns.Add(Me.columnID)
451 Me.columnSubject = New Global.System.Data.DataColumn("Subject", GetType(String), Nothing, Global.System.Data.MappingType.Element)
452 MyBase.Columns.Add(Me.columnSubject)
453 Me.columnNote = New Global.System.Data.DataColumn("Note", GetType(String), Nothing, Global.System.Data.MappingType.Element)
454 MyBase.Columns.Add(Me.columnNote)
455 Me.columnDate = New Global.System.Data.DataColumn("Date", GetType(String), Nothing, Global.System.Data.MappingType.Element)
456 Me.columnDate.ExtendedProperties.Add("Generator_ColumnPropNameInTable", "DateColumn")
457 Me.columnDate.ExtendedProperties.Add("Generator_ColumnVarNameInTable", "columnDate")
458 Me.columnDate.ExtendedProperties.Add("Generator_UserColumnName", "Date")
459 MyBase.Columns.Add(Me.columnDate)
460 Me.columnTime = New Global.System.Data.DataColumn("Time", GetType(String), Nothing, Global.System.Data.MappingType.Element)
461 MyBase.Columns.Add(Me.columnTime)
462 Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnSubject}, true))
463 Me.columnID.MaxLength = 255
464 Me.columnSubject.AllowDBNull = false
465 Me.columnSubject.Unique = true
466 Me.columnSubject.MaxLength = 255
467 Me.columnNote.MaxLength = 536870910
468 Me.columnDate.MaxLength = 255
469 Me.columnTime.MaxLength = 255
470 End Sub
471
472 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
473 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
474 Public Function NewtblEventRow() As tblEventRow
475 Return CType(Me.NewRow,tblEventRow)
476 End Function
477
478 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
479 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
480 Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
481 Return New tblEventRow(builder)
482 End Function
483
484 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
485 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
486 Protected Overrides Function GetRowType() As Global.System.Type
487 Return GetType(tblEventRow)
488 End Function
489
490 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
491 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
492 Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
493 MyBase.OnRowChanged(e)
494 If (Not (Me.tblEventRowChangedEvent) Is Nothing) Then
495 RaiseEvent tblEventRowChanged(Me, New tblEventRowChangeEvent(CType(e.Row,tblEventRow), e.Action))
496 End If
497 End Sub
498
499 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
500 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
501 Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
502 MyBase.OnRowChanging(e)
503 If (Not (Me.tblEventRowChangingEvent) Is Nothing) Then
504 RaiseEvent tblEventRowChanging(Me, New tblEventRowChangeEvent(CType(e.Row,tblEventRow), e.Action))
505 End If
506 End Sub
507
508 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
509 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
510 Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
511 MyBase.OnRowDeleted(e)
512 If (Not (Me.tblEventRowDeletedEvent) Is Nothing) Then
513 RaiseEvent tblEventRowDeleted(Me, New tblEventRowChangeEvent(CType(e.Row,tblEventRow), e.Action))
514 End If
515 End Sub
516
517 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
518 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
519 Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
520 MyBase.OnRowDeleting(e)
521 If (Not (Me.tblEventRowDeletingEvent) Is Nothing) Then
522 RaiseEvent tblEventRowDeleting(Me, New tblEventRowChangeEvent(CType(e.Row,tblEventRow), e.Action))
523 End If
524 End Sub
525
526 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
527 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
528 Public Sub RemovetblEventRow(ByVal row As tblEventRow)
529 Me.Rows.Remove(row)
530 End Sub
531
532 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
533 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
534 Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
535 Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType()
536 Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence()
537 Dim ds As schedule_dbDataSet = New schedule_dbDataSet()
538 Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
539 any1.Namespace = "http://www.w3.org/2001/XMLSchema"
540 any1.MinOccurs = New Decimal(0)
541 any1.MaxOccurs = Decimal.MaxValue
542 any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
543 sequence.Items.Add(any1)
544 Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny()
545 any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
546 any2.MinOccurs = New Decimal(1)
547 any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
548 sequence.Items.Add(any2)
549 Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
550 attribute1.Name = "namespace"
551 attribute1.FixedValue = ds.Namespace
552 type.Attributes.Add(attribute1)
553 Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute()
554 attribute2.Name = "tableTypeName"
555 attribute2.FixedValue = "tblEventDataTable"
556 type.Attributes.Add(attribute2)
557 type.Particle = sequence
558 Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
559 If xs.Contains(dsSchema.TargetNamespace) Then
560 Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
561 Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream()
562 Try
563 Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
564 dsSchema.Write(s1)
565 Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
566 Do While schemas.MoveNext
567 schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
568 s2.SetLength(0)
569 schema.Write(s2)
570 If (s1.Length = s2.Length) Then
571 s1.Position = 0
572 s2.Position = 0
573
574 Do While ((s1.Position <> s1.Length) _
575 AndAlso (s1.ReadByte = s2.ReadByte))
576
577
578 Loop
579 If (s1.Position = s1.Length) Then
580 Return type
581 End If
582 End If
583
584 Loop
585 Finally
586 If (Not (s1) Is Nothing) Then
587 s1.Close
588 End If
589 If (Not (s2) Is Nothing) Then
590 s2.Close
591 End If
592 End Try
593 End If
594 xs.Add(dsSchema)
595 Return type
596 End Function
597 End Class
598
599 '''<summary>
600 '''Represents strongly named DataRow class.
601 '''</summary>
602 Partial Public Class tblEventRow
603 Inherits Global.System.Data.DataRow
604
605 Private tabletblEvent As tblEventDataTable
606
607 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
608 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
609 Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
610 MyBase.New(rb)
611 Me.tabletblEvent = CType(Me.Table,tblEventDataTable)
612 End Sub
613
614 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
615 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
616 Public Property ID() As String
617 Get
618 Try
619 Return CType(Me(Me.tabletblEvent.IDColumn),String)
620 Catch e As Global.System.InvalidCastException
621 Throw New Global.System.Data.StrongTypingException("The value for column 'ID' in table 'tblEvent' is DBNull.", e)
622 End Try
623 End Get
624 Set
625 Me(Me.tabletblEvent.IDColumn) = value
626 End Set
627 End Property
628
629 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
630 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
631 Public Property Subject() As String
632 Get
633 Return CType(Me(Me.tabletblEvent.SubjectColumn),String)
634 End Get
635 Set
636 Me(Me.tabletblEvent.SubjectColumn) = value
637 End Set
638 End Property
639
640 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
641 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
642 Public Property Note() As String
643 Get
644 Try
645 Return CType(Me(Me.tabletblEvent.NoteColumn),String)
646 Catch e As Global.System.InvalidCastException
647 Throw New Global.System.Data.StrongTypingException("The value for column 'Note' in table 'tblEvent' is DBNull.", e)
648 End Try
649 End Get
650 Set
651 Me(Me.tabletblEvent.NoteColumn) = value
652 End Set
653 End Property
654
655 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
656 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
657 Public Property _Date() As String
658 Get
659 Try
660 Return CType(Me(Me.tabletblEvent.DateColumn),String)
661 Catch e As Global.System.InvalidCastException
662 Throw New Global.System.Data.StrongTypingException("The value for column 'Date' in table 'tblEvent' is DBNull.", e)
663 End Try
664 End Get
665 Set
666 Me(Me.tabletblEvent.DateColumn) = value
667 End Set
668 End Property
669
670 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
671 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
672 Public Property Time() As String
673 Get
674 Try
675 Return CType(Me(Me.tabletblEvent.TimeColumn),String)
676 Catch e As Global.System.InvalidCastException
677 Throw New Global.System.Data.StrongTypingException("The value for column 'Time' in table 'tblEvent' is DBNull.", e)
678 End Try
679 End Get
680 Set
681 Me(Me.tabletblEvent.TimeColumn) = value
682 End Set
683 End Property
684
685 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
686 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
687 Public Function IsIDNull() As Boolean
688 Return Me.IsNull(Me.tabletblEvent.IDColumn)
689 End Function
690
691 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
692 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
693 Public Sub SetIDNull()
694 Me(Me.tabletblEvent.IDColumn) = Global.System.Convert.DBNull
695 End Sub
696
697 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
698 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
699 Public Function IsNoteNull() As Boolean
700 Return Me.IsNull(Me.tabletblEvent.NoteColumn)
701 End Function
702
703 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
704 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
705 Public Sub SetNoteNull()
706 Me(Me.tabletblEvent.NoteColumn) = Global.System.Convert.DBNull
707 End Sub
708
709 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
710 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
711 Public Function Is_DateNull() As Boolean
712 Return Me.IsNull(Me.tabletblEvent.DateColumn)
713 End Function
714
715 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
716 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
717 Public Sub Set_DateNull()
718 Me(Me.tabletblEvent.DateColumn) = Global.System.Convert.DBNull
719 End Sub
720
721 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
722 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
723 Public Function IsTimeNull() As Boolean
724 Return Me.IsNull(Me.tabletblEvent.TimeColumn)
725 End Function
726
727 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
728 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
729 Public Sub SetTimeNull()
730 Me(Me.tabletblEvent.TimeColumn) = Global.System.Convert.DBNull
731 End Sub
732 End Class
733
734 '''<summary>
735 '''Row event argument class
736 '''</summary>
737 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
738 Public Class tblEventRowChangeEvent
739 Inherits Global.System.EventArgs
740
741 Private eventRow As tblEventRow
742
743 Private eventAction As Global.System.Data.DataRowAction
744
745 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
746 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
747 Public Sub New(ByVal row As tblEventRow, ByVal action As Global.System.Data.DataRowAction)
748 MyBase.New
749 Me.eventRow = row
750 Me.eventAction = action
751 End Sub
752
753 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
754 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
755 Public ReadOnly Property Row() As tblEventRow
756 Get
757 Return Me.eventRow
758 End Get
759 End Property
760
761 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
762 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
763 Public ReadOnly Property Action() As Global.System.Data.DataRowAction
764 Get
765 Return Me.eventAction
766 End Get
767 End Property
768 End Class
769 End Class
770
771 Namespace schedule_dbDataSetTableAdapters
772
773 '''<summary>
774 '''Represents the connection and commands used to retrieve and save data.
775 '''</summary>
776 <Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
777 Global.System.ComponentModel.ToolboxItem(true), _
778 Global.System.ComponentModel.DataObjectAttribute(true), _
779 Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
780 ", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
781 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
782 Partial Public Class tblEventTableAdapter
783 Inherits Global.System.ComponentModel.Component
784
785 Private WithEvents _adapter As Global.System.Data.OleDb.OleDbDataAdapter
786
787 Private _connection As Global.System.Data.OleDb.OleDbConnection
788
789 Private _transaction As Global.System.Data.OleDb.OleDbTransaction
790
791 Private _commandCollection() As Global.System.Data.OleDb.OleDbCommand
792
793 Private _clearBeforeFill As Boolean
794
795 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
796 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
797 Public Sub New()
798 MyBase.New
799 Me.ClearBeforeFill = true
800 End Sub
801
802 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
803 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
804 Protected Friend ReadOnly Property Adapter() As Global.System.Data.OleDb.OleDbDataAdapter
805 Get
806 If (Me._adapter Is Nothing) Then
807 Me.InitAdapter
808 End If
809 Return Me._adapter
810 End Get
811 End Property
812
813 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
814 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
815 Friend Property Connection() As Global.System.Data.OleDb.OleDbConnection
816 Get
817 If (Me._connection Is Nothing) Then
818 Me.InitConnection
819 End If
820 Return Me._connection
821 End Get
822 Set
823 Me._connection = value
824 If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
825 Me.Adapter.InsertCommand.Connection = value
826 End If
827 If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
828 Me.Adapter.DeleteCommand.Connection = value
829 End If
830 If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
831 Me.Adapter.UpdateCommand.Connection = value
832 End If
833 Dim i As Integer = 0
834 Do While (i < Me.CommandCollection.Length)
835 If (Not (Me.CommandCollection(i)) Is Nothing) Then
836 CType(Me.CommandCollection(i),Global.System.Data.OleDb.OleDbCommand).Connection = value
837 End If
838 i = (i + 1)
839 Loop
840 End Set
841 End Property
842
843 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
844 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
845 Friend Property Transaction() As Global.System.Data.OleDb.OleDbTransaction
846 Get
847 Return Me._transaction
848 End Get
849 Set
850 Me._transaction = value
851 Dim i As Integer = 0
852 Do While (i < Me.CommandCollection.Length)
853 Me.CommandCollection(i).Transaction = Me._transaction
854 i = (i + 1)
855 Loop
856 If ((Not (Me.Adapter) Is Nothing) _
857 AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
858 Me.Adapter.DeleteCommand.Transaction = Me._transaction
859 End If
860 If ((Not (Me.Adapter) Is Nothing) _
861 AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
862 Me.Adapter.InsertCommand.Transaction = Me._transaction
863 End If
864 If ((Not (Me.Adapter) Is Nothing) _
865 AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
866 Me.Adapter.UpdateCommand.Transaction = Me._transaction
867 End If
868 End Set
869 End Property
870
871 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
872 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
873 Protected ReadOnly Property CommandCollection() As Global.System.Data.OleDb.OleDbCommand()
874 Get
875 If (Me._commandCollection Is Nothing) Then
876 Me.InitCommandCollection
877 End If
878 Return Me._commandCollection
879 End Get
880 End Property
881
882 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
883 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
884 Public Property ClearBeforeFill() As Boolean
885 Get
886 Return Me._clearBeforeFill
887 End Get
888 Set
889 Me._clearBeforeFill = value
890 End Set
891 End Property
892
893 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
894 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
895 Private Sub InitAdapter()
896 Me._adapter = New Global.System.Data.OleDb.OleDbDataAdapter()
897 Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping()
898 tableMapping.SourceTable = "Table"
899 tableMapping.DataSetTable = "tblEvent"
900 tableMapping.ColumnMappings.Add("ID", "ID")
901 tableMapping.ColumnMappings.Add("Subject", "Subject")
902 tableMapping.ColumnMappings.Add("Note", "Note")
903 tableMapping.ColumnMappings.Add("Date", "Date")
904 tableMapping.ColumnMappings.Add("Time", "Time")
905 Me._adapter.TableMappings.Add(tableMapping)
906 Me._adapter.DeleteCommand = New Global.System.Data.OleDb.OleDbCommand()
907 Me._adapter.DeleteCommand.Connection = Me.Connection
908 Me._adapter.DeleteCommand.CommandText = "DELETE FROM `tblEvent` WHERE (((? = 1 AND `ID` IS NULL) OR (`ID` = ?)) AND (`Subj"& _
909 "ect` = ?) AND ((? = 1 AND `Date` IS NULL) OR (`Date` = ?)) AND ((? = 1 AND `Time"& _
910 "` IS NULL) OR (`Time` = ?)))"
911 Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text
912 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IsNull_ID", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "ID", Global.System.Data.DataRowVersion.Original, true, Nothing))
913 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_ID", Global.System.Data.OleDb.OleDbType.VarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "ID", Global.System.Data.DataRowVersion.Original, false, Nothing))
914 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_Subject", Global.System.Data.OleDb.OleDbType.VarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Subject", Global.System.Data.DataRowVersion.Original, false, Nothing))
915 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IsNull_Date", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Date", Global.System.Data.DataRowVersion.Original, true, Nothing))
916 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_Date", Global.System.Data.OleDb.OleDbType.VarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Date", Global.System.Data.DataRowVersion.Original, false, Nothing))
917 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IsNull_Time", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Time", Global.System.Data.DataRowVersion.Original, true, Nothing))
918 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_Time", Global.System.Data.OleDb.OleDbType.VarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Time", Global.System.Data.DataRowVersion.Original, false, Nothing))
919 Me._adapter.InsertCommand = New Global.System.Data.OleDb.OleDbCommand()
920 Me._adapter.InsertCommand.Connection = Me.Connection
921 Me._adapter.InsertCommand.CommandText = "INSERT INTO `tblEvent` (`ID`, `Subject`, `Note`, `Date`, `Time`) VALUES (?, ?, ?,"& _
922 " ?, ?)"
923 Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text
924 Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("ID", Global.System.Data.OleDb.OleDbType.VarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "ID", Global.System.Data.DataRowVersion.Current, false, Nothing))
925 Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Subject", Global.System.Data.OleDb.OleDbType.VarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Subject", Global.System.Data.DataRowVersion.Current, false, Nothing))
926 Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Note", Global.System.Data.OleDb.OleDbType.LongVarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Note", Global.System.Data.DataRowVersion.Current, false, Nothing))
927 Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Date", Global.System.Data.OleDb.OleDbType.VarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Date", Global.System.Data.DataRowVersion.Current, false, Nothing))
928 Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Time", Global.System.Data.OleDb.OleDbType.VarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Time", Global.System.Data.DataRowVersion.Current, false, Nothing))
929 Me._adapter.UpdateCommand = New Global.System.Data.OleDb.OleDbCommand()
930 Me._adapter.UpdateCommand.Connection = Me.Connection
931 Me._adapter.UpdateCommand.CommandText = "UPDATE `tblEvent` SET `ID` = ?, `Subject` = ?, `Note` = ?, `Date` = ?, `Time` = ?"& _
932 " WHERE (((? = 1 AND `ID` IS NULL) OR (`ID` = ?)) AND (`Subject` = ?) AND ((? = 1"& _
933 " AND `Date` IS NULL) OR (`Date` = ?)) AND ((? = 1 AND `Time` IS NULL) OR (`Time`"& _
934 " = ?)))"
935 Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text
936 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("ID", Global.System.Data.OleDb.OleDbType.VarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "ID", Global.System.Data.DataRowVersion.Current, false, Nothing))
937 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Subject", Global.System.Data.OleDb.OleDbType.VarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Subject", Global.System.Data.DataRowVersion.Current, false, Nothing))
938 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Note", Global.System.Data.OleDb.OleDbType.LongVarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Note", Global.System.Data.DataRowVersion.Current, false, Nothing))
939 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Date", Global.System.Data.OleDb.OleDbType.VarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Date", Global.System.Data.DataRowVersion.Current, false, Nothing))
940 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Time", Global.System.Data.OleDb.OleDbType.VarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Time", Global.System.Data.DataRowVersion.Current, false, Nothing))
941 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IsNull_ID", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "ID", Global.System.Data.DataRowVersion.Original, true, Nothing))
942 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_ID", Global.System.Data.OleDb.OleDbType.VarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "ID", Global.System.Data.DataRowVersion.Original, false, Nothing))
943 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_Subject", Global.System.Data.OleDb.OleDbType.VarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Subject", Global.System.Data.DataRowVersion.Original, false, Nothing))
944 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IsNull_Date", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Date", Global.System.Data.DataRowVersion.Original, true, Nothing))
945 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_Date", Global.System.Data.OleDb.OleDbType.VarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Date", Global.System.Data.DataRowVersion.Original, false, Nothing))
946 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("IsNull_Time", Global.System.Data.OleDb.OleDbType.[Integer], 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Time", Global.System.Data.DataRowVersion.Original, true, Nothing))
947 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.OleDb.OleDbParameter("Original_Time", Global.System.Data.OleDb.OleDbType.VarWChar, 0, Global.System.Data.ParameterDirection.Input, CType(0,Byte), CType(0,Byte), "Time", Global.System.Data.DataRowVersion.Original, false, Nothing))
948 End Sub
949
950 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
951 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
952 Private Sub InitConnection()
953 Me._connection = New Global.System.Data.OleDb.OleDbConnection()
954 Me._connection.ConnectionString = Global.Daily_Schedule_System.My.MySettings.Default.schedule_dbConn
955 End Sub
956
957 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
958 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
959 Private Sub InitCommandCollection()
960 Me._commandCollection = New Global.System.Data.OleDb.OleDbCommand(0) {}
961 Me._commandCollection(0) = New Global.System.Data.OleDb.OleDbCommand()
962 Me._commandCollection(0).Connection = Me.Connection
963 Me._commandCollection(0).CommandText = "SELECT ID, Subject, [Note], [Date], [Time] FROM tblEvent"
964 Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text
965 End Sub
966
967 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
968 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
969 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
970 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
971 Public Overloads Overridable Function Fill(ByVal dataTable As schedule_dbDataSet.tblEventDataTable) As Integer
972 Me.Adapter.SelectCommand = Me.CommandCollection(0)
973 If (Me.ClearBeforeFill = true) Then
974 dataTable.Clear
975 End If
976 Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
977 Return returnValue
978 End Function
979
980 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
981 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
982 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
983 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
984 Public Overloads Overridable Function GetData() As schedule_dbDataSet.tblEventDataTable
985 Me.Adapter.SelectCommand = Me.CommandCollection(0)
986 Dim dataTable As schedule_dbDataSet.tblEventDataTable = New schedule_dbDataSet.tblEventDataTable()
987 Me.Adapter.Fill(dataTable)
988 Return dataTable
989 End Function
990
991 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
992 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
993 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
994 Public Overloads Overridable Function Update(ByVal dataTable As schedule_dbDataSet.tblEventDataTable) As Integer
995 Return Me.Adapter.Update(dataTable)
996 End Function
997
998 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
999 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
1000 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
1001 Public Overloads Overridable Function Update(ByVal dataSet As schedule_dbDataSet) As Integer
1002 Return Me.Adapter.Update(dataSet, "tblEvent")
1003 End Function
1004
1005 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1006 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
1007 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
1008 Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer
1009 Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow})
1010 End Function
1011
1012 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1013 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
1014 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
1015 Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer
1016 Return Me.Adapter.Update(dataRows)
1017 End Function
1018
1019 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1020 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
1021 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
1022 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete, true)> _
1023 Public Overloads Overridable Function Delete(ByVal Original_ID As String, ByVal Original_Subject As String, ByVal Original_Date As String, ByVal Original_Time As String) As Integer
1024 If (Original_ID Is Nothing) Then
1025 Me.Adapter.DeleteCommand.Parameters(0).Value = CType(1,Object)
1026 Me.Adapter.DeleteCommand.Parameters(1).Value = Global.System.DBNull.Value
1027 Else
1028 Me.Adapter.DeleteCommand.Parameters(0).Value = CType(0,Object)
1029 Me.Adapter.DeleteCommand.Parameters(1).Value = CType(Original_ID,String)
1030 End If
1031 If (Original_Subject Is Nothing) Then
1032 Me.Adapter.DeleteCommand.Parameters(2).Value = Global.System.DBNull.Value
1033 Else
1034 Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_Subject,String)
1035 End If
1036 If (Original_Date Is Nothing) Then
1037 Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object)
1038 Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value
1039 Else
1040 Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object)
1041 Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_Date,String)
1042 End If
1043 If (Original_Time Is Nothing) Then
1044 Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object)
1045 Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value
1046 Else
1047 Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object)
1048 Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_Time,String)
1049 End If
1050 Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State
1051 If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
1052 <> Global.System.Data.ConnectionState.Open) Then
1053 Me.Adapter.DeleteCommand.Connection.Open
1054 End If
1055 Try
1056 Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery
1057 Return returnValue
1058 Finally
1059 If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
1060 Me.Adapter.DeleteCommand.Connection.Close
1061 End If
1062 End Try
1063 End Function
1064
1065 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1066 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
1067 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
1068 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, true)> _
1069 Public Overloads Overridable Function Insert(ByVal ID As String, ByVal Subject As String, ByVal Note As String, ByVal _Date As String, ByVal Time As String) As Integer
1070 If (ID Is Nothing) Then
1071 Me.Adapter.InsertCommand.Parameters(0).Value = Global.System.DBNull.Value
1072 Else
1073 Me.Adapter.InsertCommand.Parameters(0).Value = CType(ID,String)
1074 End If
1075 If (Subject Is Nothing) Then
1076 Me.Adapter.InsertCommand.Parameters(1).Value = Global.System.DBNull.Value
1077 Else
1078 Me.Adapter.InsertCommand.Parameters(1).Value = CType(Subject,String)
1079 End If
1080 If (Note Is Nothing) Then
1081 Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value
1082 Else
1083 Me.Adapter.InsertCommand.Parameters(2).Value = CType(Note,String)
1084 End If
1085 If (_Date Is Nothing) Then
1086 Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value
1087 Else
1088 Me.Adapter.InsertCommand.Parameters(3).Value = CType(_Date,String)
1089 End If
1090 If (Time Is Nothing) Then
1091 Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value
1092 Else
1093 Me.Adapter.InsertCommand.Parameters(4).Value = CType(Time,String)
1094 End If
1095 Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State
1096 If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
1097 <> Global.System.Data.ConnectionState.Open) Then
1098 Me.Adapter.InsertCommand.Connection.Open
1099 End If
1100 Try
1101 Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery
1102 Return returnValue
1103 Finally
1104 If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
1105 Me.Adapter.InsertCommand.Connection.Close
1106 End If
1107 End Try
1108 End Function
1109
1110 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1111 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
1112 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
1113 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
1114 Public Overloads Overridable Function Update(ByVal ID As String, ByVal Subject As String, ByVal Note As String, ByVal _Date As String, ByVal Time As String, ByVal Original_ID As String, ByVal Original_Subject As String, ByVal Original_Date As String, ByVal Original_Time As String) As Integer
1115 If (ID Is Nothing) Then
1116 Me.Adapter.UpdateCommand.Parameters(0).Value = Global.System.DBNull.Value
1117 Else
1118 Me.Adapter.UpdateCommand.Parameters(0).Value = CType(ID,String)
1119 End If
1120 If (Subject Is Nothing) Then
1121 Me.Adapter.UpdateCommand.Parameters(1).Value = Global.System.DBNull.Value
1122 Else
1123 Me.Adapter.UpdateCommand.Parameters(1).Value = CType(Subject,String)
1124 End If
1125 If (Note Is Nothing) Then
1126 Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value
1127 Else
1128 Me.Adapter.UpdateCommand.Parameters(2).Value = CType(Note,String)
1129 End If
1130 If (_Date Is Nothing) Then
1131 Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value
1132 Else
1133 Me.Adapter.UpdateCommand.Parameters(3).Value = CType(_Date,String)
1134 End If
1135 If (Time Is Nothing) Then
1136 Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value
1137 Else
1138 Me.Adapter.UpdateCommand.Parameters(4).Value = CType(Time,String)
1139 End If
1140 If (Original_ID Is Nothing) Then
1141 Me.Adapter.UpdateCommand.Parameters(5).Value = CType(1,Object)
1142 Me.Adapter.UpdateCommand.Parameters(6).Value = Global.System.DBNull.Value
1143 Else
1144 Me.Adapter.UpdateCommand.Parameters(5).Value = CType(0,Object)
1145 Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Original_ID,String)
1146 End If
1147 If (Original_Subject Is Nothing) Then
1148 Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value
1149 Else
1150 Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Original_Subject,String)
1151 End If
1152 If (Original_Date Is Nothing) Then
1153 Me.Adapter.UpdateCommand.Parameters(8).Value = CType(1,Object)
1154 Me.Adapter.UpdateCommand.Parameters(9).Value = Global.System.DBNull.Value
1155 Else
1156 Me.Adapter.UpdateCommand.Parameters(8).Value = CType(0,Object)
1157 Me.Adapter.UpdateCommand.Parameters(9).Value = CType(Original_Date,String)
1158 End If
1159 If (Original_Time Is Nothing) Then
1160 Me.Adapter.UpdateCommand.Parameters(10).Value = CType(1,Object)
1161 Me.Adapter.UpdateCommand.Parameters(11).Value = Global.System.DBNull.Value
1162 Else
1163 Me.Adapter.UpdateCommand.Parameters(10).Value = CType(0,Object)
1164 Me.Adapter.UpdateCommand.Parameters(11).Value = CType(Original_Time,String)
1165 End If
1166 Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
1167 If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
1168 <> Global.System.Data.ConnectionState.Open) Then
1169 Me.Adapter.UpdateCommand.Connection.Open
1170 End If
1171 Try
1172 Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery
1173 Return returnValue
1174 Finally
1175 If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
1176 Me.Adapter.UpdateCommand.Connection.Close
1177 End If
1178 End Try
1179 End Function
1180
1181 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1182 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
1183 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
1184 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
1185 Public Overloads Overridable Function Update(ByVal ID As String, ByVal Note As String, ByVal _Date As String, ByVal Time As String, ByVal Original_ID As String, ByVal Original_Subject As String, ByVal Original_Date As String, ByVal Original_Time As String) As Integer
1186 Return Me.Update(ID, Original_Subject, Note, _Date, Time, Original_ID, Original_Subject, Original_Date, Original_Time)
1187 End Function
1188 End Class
1189
1190 '''<summary>
1191 '''TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
1192 '''</summary>
1193 <Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
1194 Global.System.ComponentModel.ToolboxItem(true), _
1195 Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD"& _
1196 "esigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
1197 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapterManager")> _
1198 Partial Public Class TableAdapterManager
1199 Inherits Global.System.ComponentModel.Component
1200
1201 Private _updateOrder As UpdateOrderOption
1202
1203 Private _tblEventTableAdapter As tblEventTableAdapter
1204
1205 Private _backupDataSetBeforeUpdate As Boolean
1206
1207 Private _connection As Global.System.Data.IDbConnection
1208
1209 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1210 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1211 Public Property UpdateOrder() As UpdateOrderOption
1212 Get
1213 Return Me._updateOrder
1214 End Get
1215 Set
1216 Me._updateOrder = value
1217 End Set
1218 End Property
1219
1220 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1221 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
1222 Global.System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso"& _
1223 "ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3"& _
1224 "a", "System.Drawing.Design.UITypeEditor")> _
1225 Public Property tblEventTableAdapter() As tblEventTableAdapter
1226 Get
1227 Return Me._tblEventTableAdapter
1228 End Get
1229 Set
1230 Me._tblEventTableAdapter = value
1231 End Set
1232 End Property
1233
1234 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1235 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1236 Public Property BackupDataSetBeforeUpdate() As Boolean
1237 Get
1238 Return Me._backupDataSetBeforeUpdate
1239 End Get
1240 Set
1241 Me._backupDataSetBeforeUpdate = value
1242 End Set
1243 End Property
1244
1245 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1246 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
1247 Global.System.ComponentModel.Browsable(false)> _
1248 Public Property Connection() As Global.System.Data.IDbConnection
1249 Get
1250 If (Not (Me._connection) Is Nothing) Then
1251 Return Me._connection
1252 End If
1253 If ((Not (Me._tblEventTableAdapter) Is Nothing) _
1254 AndAlso (Not (Me._tblEventTableAdapter.Connection) Is Nothing)) Then
1255 Return Me._tblEventTableAdapter.Connection
1256 End If
1257 Return Nothing
1258 End Get
1259 Set
1260 Me._connection = value
1261 End Set
1262 End Property
1263
1264 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1265 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0"), _
1266 Global.System.ComponentModel.Browsable(false)> _
1267 Public ReadOnly Property TableAdapterInstanceCount() As Integer
1268 Get
1269 Dim count As Integer = 0
1270 If (Not (Me._tblEventTableAdapter) Is Nothing) Then
1271 count = (count + 1)
1272 End If
1273 Return count
1274 End Get
1275 End Property
1276
1277 '''<summary>
1278 '''Update rows in top-down order.
1279 '''</summary>
1280 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1281 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1282 Private Function UpdateUpdatedRows(ByVal dataSet As schedule_dbDataSet, ByVal allChangedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow), ByVal allAddedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Integer
1283 Dim result As Integer = 0
1284 If (Not (Me._tblEventTableAdapter) Is Nothing) Then
1285 Dim updatedRows() As Global.System.Data.DataRow = dataSet.tblEvent.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent)
1286 updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows)
1287 If ((Not (updatedRows) Is Nothing) _
1288 AndAlso (0 < updatedRows.Length)) Then
1289 result = (result + Me._tblEventTableAdapter.Update(updatedRows))
1290 allChangedRows.AddRange(updatedRows)
1291 End If
1292 End If
1293 Return result
1294 End Function
1295
1296 '''<summary>
1297 '''Insert rows in top-down order.
1298 '''</summary>
1299 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1300 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1301 Private Function UpdateInsertedRows(ByVal dataSet As schedule_dbDataSet, ByVal allAddedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Integer
1302 Dim result As Integer = 0
1303 If (Not (Me._tblEventTableAdapter) Is Nothing) Then
1304 Dim addedRows() As Global.System.Data.DataRow = dataSet.tblEvent.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added)
1305 If ((Not (addedRows) Is Nothing) _
1306 AndAlso (0 < addedRows.Length)) Then
1307 result = (result + Me._tblEventTableAdapter.Update(addedRows))
1308 allAddedRows.AddRange(addedRows)
1309 End If
1310 End If
1311 Return result
1312 End Function
1313
1314 '''<summary>
1315 '''Delete rows in bottom-up order.
1316 '''</summary>
1317 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1318 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1319 Private Function UpdateDeletedRows(ByVal dataSet As schedule_dbDataSet, ByVal allChangedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Integer
1320 Dim result As Integer = 0
1321 If (Not (Me._tblEventTableAdapter) Is Nothing) Then
1322 Dim deletedRows() As Global.System.Data.DataRow = dataSet.tblEvent.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted)
1323 If ((Not (deletedRows) Is Nothing) _
1324 AndAlso (0 < deletedRows.Length)) Then
1325 result = (result + Me._tblEventTableAdapter.Update(deletedRows))
1326 allChangedRows.AddRange(deletedRows)
1327 End If
1328 End If
1329 Return result
1330 End Function
1331
1332 '''<summary>
1333 '''Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first
1334 '''</summary>
1335 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1336 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1337 Private Function GetRealUpdatedRows(ByVal updatedRows() As Global.System.Data.DataRow, ByVal allAddedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Global.System.Data.DataRow()
1338 If ((updatedRows Is Nothing) _
1339 OrElse (updatedRows.Length < 1)) Then
1340 Return updatedRows
1341 End If
1342 If ((allAddedRows Is Nothing) _
1343 OrElse (allAddedRows.Count < 1)) Then
1344 Return updatedRows
1345 End If
1346 Dim realUpdatedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow) = New Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)()
1347 Dim i As Integer = 0
1348 Do While (i < updatedRows.Length)
1349 Dim row As Global.System.Data.DataRow = updatedRows(i)
1350 If (allAddedRows.Contains(row) = false) Then
1351 realUpdatedRows.Add(row)
1352 End If
1353 i = (i + 1)
1354 Loop
1355 Return realUpdatedRows.ToArray
1356 End Function
1357
1358 '''<summary>
1359 '''Update all changes to the dataset.
1360 '''</summary>
1361 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1362 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1363 Public Overridable Function UpdateAll(ByVal dataSet As schedule_dbDataSet) As Integer
1364 If (dataSet Is Nothing) Then
1365 Throw New Global.System.ArgumentNullException("dataSet")
1366 End If
1367 If (dataSet.HasChanges = false) Then
1368 Return 0
1369 End If
1370 If ((Not (Me._tblEventTableAdapter) Is Nothing) _
1371 AndAlso (Me.MatchTableAdapterConnection(Me._tblEventTableAdapter.Connection) = false)) Then
1372 Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _
1373 "tring.")
1374 End If
1375 Dim workConnection As Global.System.Data.IDbConnection = Me.Connection
1376 If (workConnection Is Nothing) Then
1377 Throw New Global.System.ApplicationException("TableAdapterManager contains no connection information. Set each TableAdapterMana"& _
1378 "ger TableAdapter property to a valid TableAdapter instance.")
1379 End If
1380 Dim workConnOpened As Boolean = false
1381 If ((workConnection.State And Global.System.Data.ConnectionState.Broken) _
1382 = Global.System.Data.ConnectionState.Broken) Then
1383 workConnection.Close
1384 End If
1385 If (workConnection.State = Global.System.Data.ConnectionState.Closed) Then
1386 workConnection.Open
1387 workConnOpened = true
1388 End If
1389 Dim workTransaction As Global.System.Data.IDbTransaction = workConnection.BeginTransaction
1390 If (workTransaction Is Nothing) Then
1391 Throw New Global.System.ApplicationException("The transaction cannot begin. The current data connection does not support transa"& _
1392 "ctions or the current state is not allowing the transaction to begin.")
1393 End If
1394 Dim allChangedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow) = New Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)()
1395 Dim allAddedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow) = New Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)()
1396 Dim adaptersWithAcceptChangesDuringUpdate As Global.System.Collections.Generic.List(Of Global.System.Data.Common.DataAdapter) = New Global.System.Collections.Generic.List(Of Global.System.Data.Common.DataAdapter)()
1397 Dim revertConnections As Global.System.Collections.Generic.Dictionary(Of Object, Global.System.Data.IDbConnection) = New Global.System.Collections.Generic.Dictionary(Of Object, Global.System.Data.IDbConnection)()
1398 Dim result As Integer = 0
1399 Dim backupDataSet As Global.System.Data.DataSet = Nothing
1400 If Me.BackupDataSetBeforeUpdate Then
1401 backupDataSet = New Global.System.Data.DataSet()
1402 backupDataSet.Merge(dataSet)
1403 End If
1404 Try
1405 '---- Prepare for update -----------
1406 '
1407 If (Not (Me._tblEventTableAdapter) Is Nothing) Then
1408 revertConnections.Add(Me._tblEventTableAdapter, Me._tblEventTableAdapter.Connection)
1409 Me._tblEventTableAdapter.Connection = CType(workConnection,Global.System.Data.OleDb.OleDbConnection)
1410 Me._tblEventTableAdapter.Transaction = CType(workTransaction,Global.System.Data.OleDb.OleDbTransaction)
1411 If Me._tblEventTableAdapter.Adapter.AcceptChangesDuringUpdate Then
1412 Me._tblEventTableAdapter.Adapter.AcceptChangesDuringUpdate = false
1413 adaptersWithAcceptChangesDuringUpdate.Add(Me._tblEventTableAdapter.Adapter)
1414 End If
1415 End If
1416 '
1417 '---- Perform updates -----------
1418 '
1419 If (Me.UpdateOrder = UpdateOrderOption.UpdateInsertDelete) Then
1420 result = (result + Me.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows))
1421 result = (result + Me.UpdateInsertedRows(dataSet, allAddedRows))
1422 Else
1423 result = (result + Me.UpdateInsertedRows(dataSet, allAddedRows))
1424 result = (result + Me.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows))
1425 End If
1426 result = (result + Me.UpdateDeletedRows(dataSet, allChangedRows))
1427 '
1428 '---- Commit updates -----------
1429 '
1430 workTransaction.Commit
1431 If (0 < allAddedRows.Count) Then
1432 Dim rows((allAddedRows.Count) - 1) As Global.System.Data.DataRow
1433 allAddedRows.CopyTo(rows)
1434 Dim i As Integer = 0
1435 Do While (i < rows.Length)
1436 Dim row As Global.System.Data.DataRow = rows(i)
1437 row.AcceptChanges
1438 i = (i + 1)
1439 Loop
1440 End If
1441 If (0 < allChangedRows.Count) Then
1442 Dim rows((allChangedRows.Count) - 1) As Global.System.Data.DataRow
1443 allChangedRows.CopyTo(rows)
1444 Dim i As Integer = 0
1445 Do While (i < rows.Length)
1446 Dim row As Global.System.Data.DataRow = rows(i)
1447 row.AcceptChanges
1448 i = (i + 1)
1449 Loop
1450 End If
1451 Catch ex As Global.System.Exception
1452 workTransaction.Rollback
1453 '---- Restore the dataset -----------
1454 If Me.BackupDataSetBeforeUpdate Then
1455 Global.System.Diagnostics.Debug.Assert((Not (backupDataSet) Is Nothing))
1456 dataSet.Clear
1457 dataSet.Merge(backupDataSet)
1458 Else
1459 If (0 < allAddedRows.Count) Then
1460 Dim rows((allAddedRows.Count) - 1) As Global.System.Data.DataRow
1461 allAddedRows.CopyTo(rows)
1462 Dim i As Integer = 0
1463 Do While (i < rows.Length)
1464 Dim row As Global.System.Data.DataRow = rows(i)
1465 row.AcceptChanges
1466 row.SetAdded
1467 i = (i + 1)
1468 Loop
1469 End If
1470 End If
1471 Throw ex
1472 Finally
1473 If workConnOpened Then
1474 workConnection.Close
1475 End If
1476 If (Not (Me._tblEventTableAdapter) Is Nothing) Then
1477 Me._tblEventTableAdapter.Connection = CType(revertConnections(Me._tblEventTableAdapter),Global.System.Data.OleDb.OleDbConnection)
1478 Me._tblEventTableAdapter.Transaction = Nothing
1479 End If
1480 If (0 < adaptersWithAcceptChangesDuringUpdate.Count) Then
1481 Dim adapters((adaptersWithAcceptChangesDuringUpdate.Count) - 1) As Global.System.Data.Common.DataAdapter
1482 adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters)
1483 Dim i As Integer = 0
1484 Do While (i < adapters.Length)
1485 Dim adapter As Global.System.Data.Common.DataAdapter = adapters(i)
1486 adapter.AcceptChangesDuringUpdate = true
1487 i = (i + 1)
1488 Loop
1489 End If
1490 End Try
1491 Return result
1492 End Function
1493
1494 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1495 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1496 Protected Overridable Sub SortSelfReferenceRows(ByVal rows() As Global.System.Data.DataRow, ByVal relation As Global.System.Data.DataRelation, ByVal childFirst As Boolean)
1497 Global.System.Array.Sort(Of Global.System.Data.DataRow)(rows, New SelfReferenceComparer(relation, childFirst))
1498 End Sub
1499
1500 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1501 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1502 Protected Overridable Function MatchTableAdapterConnection(ByVal inputConnection As Global.System.Data.IDbConnection) As Boolean
1503 If (Not (Me._connection) Is Nothing) Then
1504 Return true
1505 End If
1506 If ((Me.Connection Is Nothing) _
1507 OrElse (inputConnection Is Nothing)) Then
1508 Return true
1509 End If
1510 If String.Equals(Me.Connection.ConnectionString, inputConnection.ConnectionString, Global.System.StringComparison.Ordinal) Then
1511 Return true
1512 End If
1513 Return false
1514 End Function
1515
1516 '''<summary>
1517 '''Update Order Option
1518 '''</summary>
1519 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1520 Public Enum UpdateOrderOption
1521
1522 InsertUpdateDelete = 0
1523
1524 UpdateInsertDelete = 1
1525 End Enum
1526
1527 '''<summary>
1528 '''Used to sort self-referenced table's rows
1529 '''</summary>
1530 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1531 Private Class SelfReferenceComparer
1532 Inherits Object
1533 Implements Global.System.Collections.Generic.IComparer(Of Global.System.Data.DataRow)
1534
1535 Private _relation As Global.System.Data.DataRelation
1536
1537 Private _childFirst As Integer
1538
1539 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1540 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1541 Friend Sub New(ByVal relation As Global.System.Data.DataRelation, ByVal childFirst As Boolean)
1542 MyBase.New
1543 Me._relation = relation
1544 If childFirst Then
1545 Me._childFirst = -1
1546 Else
1547 Me._childFirst = 1
1548 End If
1549 End Sub
1550
1551 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1552 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1553 Private Function GetRoot(ByVal row As Global.System.Data.DataRow, ByRef distance As Integer) As Global.System.Data.DataRow
1554 Global.System.Diagnostics.Debug.Assert((Not (row) Is Nothing))
1555 Dim root As Global.System.Data.DataRow = row
1556 distance = 0
1557
1558 Dim traversedRows As Global.System.Collections.Generic.IDictionary(Of Global.System.Data.DataRow, Global.System.Data.DataRow) = New Global.System.Collections.Generic.Dictionary(Of Global.System.Data.DataRow, Global.System.Data.DataRow)()
1559 traversedRows(row) = row
1560
1561 Dim parent As Global.System.Data.DataRow = row.GetParentRow(Me._relation, Global.System.Data.DataRowVersion.[Default])
1562
1563 Do While ((Not (parent) Is Nothing) _
1564 AndAlso (traversedRows.ContainsKey(parent) = false))
1565 distance = (distance + 1)
1566 root = parent
1567 traversedRows(parent) = parent
1568 parent = parent.GetParentRow(Me._relation, Global.System.Data.DataRowVersion.[Default])
1569
1570 Loop
1571
1572 If (distance = 0) Then
1573 traversedRows.Clear
1574 traversedRows(row) = row
1575 parent = row.GetParentRow(Me._relation, Global.System.Data.DataRowVersion.Original)
1576
1577 Do While ((Not (parent) Is Nothing) _
1578 AndAlso (traversedRows.ContainsKey(parent) = false))
1579 distance = (distance + 1)
1580 root = parent
1581 traversedRows(parent) = parent
1582 parent = parent.GetParentRow(Me._relation, Global.System.Data.DataRowVersion.Original)
1583
1584 Loop
1585 End If
1586
1587 Return root
1588 End Function
1589
1590 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1591 Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")> _
1592 Public Function Compare(ByVal row1 As Global.System.Data.DataRow, ByVal row2 As Global.System.Data.DataRow) As Integer Implements Global.System.Collections.Generic.IComparer(Of Global.System.Data.DataRow).Compare
1593 If Object.ReferenceEquals(row1, row2) Then
1594 Return 0
1595 End If
1596 If (row1 Is Nothing) Then
1597 Return -1
1598 End If
1599 If (row2 Is Nothing) Then
1600 Return 1
1601 End If
1602
1603 Dim distance1 As Integer = 0
1604 Dim root1 As Global.System.Data.DataRow = Me.GetRoot(row1, distance1)
1605
1606 Dim distance2 As Integer = 0
1607 Dim root2 As Global.System.Data.DataRow = Me.GetRoot(row2, distance2)
1608
1609 If Object.ReferenceEquals(root1, root2) Then
1610 Return (Me._childFirst * distance1.CompareTo(distance2))
1611 Else
1612 Global.System.Diagnostics.Debug.Assert(((Not (root1.Table) Is Nothing) _
1613 AndAlso (Not (root2.Table) Is Nothing)))
1614 If (root1.Table.Rows.IndexOf(root1) < root2.Table.Rows.IndexOf(root2)) Then
1615 Return -1
1616 Else
1617 Return 1
1618 End If
1619 End If
1620 End Function
1621 End Class
1622 End Class
1623 End Namespace